*****************************
* Where You Sit Matters: appendix  
*****************************

/*Load data file first: "DiploMid_violent.dta" */ 

/*APPENDIX TABLE 0.1 RESULTS*/
* Column 1 
drop if majpow1 ==1

logit mzinit lnbet1 cap1 logdistance binarycontig binaryalliance jointIGO jointdemo peaceyears _spline1 _spline2 _spline3, cluster(dyadid) nolog 

* Column 2
xtset dyadid year 
xtgee mzinit lnbet1 cap1 logdistance binarycontig binaryalliance jointIGO jointdemo, family(binomial) link(logit) corr(ar1) force robust nolog


/*APPENDIX TABLE 0.2 RESULTS*/
/*Load data file first: "DiploMid_violent.dta" */ 

heckprob violentMID lnbet1 cap1 majpow1 logdistance binarycontig binaryalliance jointIGO jointdemo, sel(mzinit = lnbet1 cap1 majpow1 logdistance binarycontig binaryalliance jointIGO jointdemo peaceyears _spline1 _spline2 _spline3) cluster(dyadid) 


/*APPENDIX TABLE 0.3 RESULTS*/
/*Load data file first: "DiploMid_violent.dta" */ 
relogit mzinit lnbet1 cap1 majpow1 logdistance binarycontig binaryalliance jointIGO jointdemo peaceyears _spline1 _spline2 _spline3, cluster(dyadid)


/*APPENDIX TABLE 0.4 RESULTS*/
/*Load data file "DiploMid_countryyear" first*/ 

* Column 1 
logit mzinit lnbet cap majpow dem peaceyears _spline1 _spline2 _spline3 
* Column 2
xtset ccode year
xtgee mzinit lnbet cap majpow dem, family(binomial) link(logit) corr(ar1) force robust
